package net.jueb.sniff4j.impl.http.user;

import io.netty.channel.Channel;
import net.jueb.sniff4j.extr.auth.User;
import net.jueb.sniff4j.extr.base.AbstractRuntime;
import net.jueb.sniff4j.extr.filter.DefaultObjectFilter;
import net.jueb.sniff4j.impl.http.filter.HttpRequestFilter;
import net.jueb.sniff4j.impl.http.filter.HttpResponseFilter;

/**
 * 使用http请求相应过滤器的用户类型
 * @author Administrator
 *
 */
public class HttpUser extends User{

	public HttpUser(String name, String passwd) {
		super(name, passwd);
	}

	@Override
	public DefaultObjectFilter getSendToClientFilter(Channel fromChannel,Channel toChannel, AbstractRuntime runtime) {
		return new HttpResponseFilter(fromChannel, toChannel, runtime);
	}

	@Override
	public DefaultObjectFilter getSendToTargetFilter(Channel fromChannel,
			Channel toChannel, AbstractRuntime runtime) {
		return new HttpRequestFilter(fromChannel, toChannel, runtime);
	}

}
